package com.tf.temper.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.tf.temper.dao.UserDao;
import com.tf.temper.entity.UserEntity;
import com.tf.temper.service.UserService;
import com.ccssoft.m8.common.ccssoft.modules.util.EntityWrapperHandle;
import com.ccssoft.m8.common.ccssoft.modules.util.PageUtils;
import com.ccssoft.m8.common.ccssoft.modules.util.Query;


@Service("userService")
public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements UserService<UserEntity>
{
    public PageUtils<UserEntity> queryPage(Map<String, Object> params)
    {
        EntityWrapperHandle<UserEntity> ew = new EntityWrapperHandle<UserEntity>(params);
        Page<UserEntity> page = this.selectPage(new Query<UserEntity>(params).getPage(),ew);
        page.setTotal(this.selectCount(ew));
        return new PageUtils<UserEntity>(page);
    }

    public List<UserEntity> queryPageByLike(Map<String, Object> params)
    {
        return baseMapper.queryPageByLike(params);
    }
}
